<!DOCTYPE html>
<html>
	<head lang="en">
		<meta charset="UTF-8">
		<title>节点信息</title>
	</head>
	<body>
		<ul id="nodeList">
			<li>nodeName</li>
			<li>nodeValue</li>
			<li>nodeType</li>
		</ul>
		<p></p>
		<script>
			var nodes = document.getElementById("nodeList");
			var type1 = nodes.firstElementChild.nodeType;
			var type2 = nodes.firstElementChild.firstChild.nodeType;
			var name1 = nodes.firstElementChild.firstChild.nodeName;
			var str = nodes.firstElementChild.firstChild.nodeValue;
			var con = "type1：" + type1 + "<br/>type2：" + type2 
			+ "<br/>name1：" + name1 + "<br/>str：" + str;
			document.getElementById("nodeList").nextElementSibling.innerHTML = con;
		</script>
	</body>
</html>